/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.suspend.b.e;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class g {
    public static boolean a(Context paramContext) {
        try {
            if (paramContext == null)
                return false;
            ConnectivityManager localConnectivityManager = (ConnectivityManager) paramContext
                    .getSystemService("connectivity");
            if (localConnectivityManager == null)
                return false;
            NetworkInfo[] arrayOfNetworkInfo1 = localConnectivityManager.getAllNetworkInfo();
            if (arrayOfNetworkInfo1 == null)
                return false;
            for (NetworkInfo localNetworkInfo : arrayOfNetworkInfo1)
                if (localNetworkInfo.isConnectedOrConnecting())
                    return true;
            return false;
        } catch (Throwable localThrowable) {
            localThrowable.printStackTrace();
        }
        return false;
    }
}